#ifndef __SBUS_H__
#define __SBUS_H__

#include "main.h"

#define LIMIT( x,min,max ) ( (x) < (min)  ? (min) : ( (x) > (max) ? (max) : (x) ) )

enum RC_STATUS_ENUM{
	RC_RC = 0,
	RC_CLIENT
};

void sbus_recv(uint8_t *buf);
int sbus_parse(uint8_t *buf,uint16_t *val);
void client_recv(uint8_t *buf, int len);
void rc_loop(void);

#endif

